package com.itheima.reggie.dto;

import cn.hutool.core.util.ObjectUtil;
import lombok.Data;

@Data
public class PageDto {
    private Integer page;
    private Integer pageSize;
    private String name;

    //校验page和pageSize
    public void check() {
        //校验参数
        if (ObjectUtil.isEmpty(this.page) || this.page <= 0) this.page = 1;
        if (ObjectUtil.isEmpty(this.pageSize) || this.pageSize <= 0) this.page = 10;
    }
}
